//
//  MBProgressHUD+Add.h
//  Walker
//
//  Created by 代佳宏 on 2017/7/5.
//  Copyright © 2017年 DaiJIaHong. All rights reserved.
//

#import <MBProgressHUD/MBProgressHUD.h>

#define MBError(message)            [MBProgressHUD showError:message toView:nil]
#define MBSuccess(message)          [MBProgressHUD showSuccess:message toView:nil]

#define MBTip(message)              [MBProgressHUD showTip:message toView:nil]
#define MBTipInView(message,view)   [MBProgressHUD showTip:message toView:view]

#define MBLoad(message)             [MBProgressHUD loadMessage:message toView:nil]
#define MBLoadInView(message,view)  [MBProgressHUD loadMessage:message toView:view]
#define MBHide                      [MBProgressHUD loadHideWithAnimate:YES toView:nil]
#define MBHideInView(view)          [MBProgressHUD loadHideWithAnimate:YES toView:view]

@interface MBProgressHUD (Add)

#pragma mark - 成功或失败信息,默认一秒钟消失
+ (void)showError:(NSString *)error toView:(UIView *)view;
+ (void)showSuccess:(NSString *)success toView:(UIView *)view;

#pragma mark - 提示信息,默认一秒钟消失
+ (void)showTip:(NSString *)tip toView:(UIView *)view;
+ (void)showTip:(NSString *)tip toView:(UIView *)view after:(CGFloat)afterDelay;
+ (void)showTip:(NSString *)message withImage:(NSString *)image toView:(UIView *)view;
+ (void)showTip:(NSString *)message withImage:(NSString *)image toView:(UIView *)view after:(CGFloat)afterDelay;

#pragma mark - loading信息，不消失
+ (void)loadMessage:(NSString *)message toView:(UIView *)view;
+ (void)loadMessage:(NSString *)message withImage:(NSString *)image toView:(UIView *)view;
+ (void)loadHideWithAnimate:(BOOL)animate toView:(UIView *)view;

#pragma mark - progress
+ (void)showProgress:(CGFloat)progress toView:(UIView *)view;
+ (void)showProgress:(CGFloat)progress withMessage:(NSString *)message toView:(UIView *)view;
+ (void)showProgress:(CGFloat)progress withType:(MBProgressHUDMode)mode toView:(UIView *)view;
+ (void)showProgress:(CGFloat)progress withType:(MBProgressHUDMode)mode withMessage:(NSString *)message toView:(UIView *)view;
+ (void)showProgress:(CGFloat)progress withType:(MBProgressHUDMode)mode withMessage:(NSString *)message toView:(UIView *)view after:(CGFloat)afterDelay;

@end
